<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_CSS常用值</title>
    <style>
        h1{
            /* rgb表示法(red,green,blue) 取值是0-255
               rgba 最后一个值表示元素的透明度 取值是0-1*/
            color: rgba(128,128,128,1);
            color: rgb(255,0,0);
            color: rgb(0,0,255);
            color: rgb(255,255,0);
            color: rgb(0,255,255);
            /* 16进制表示法 #rrggbb 每一个r/g/b取值是0-f */
            color: #808080;
            color: rgba(255,255,255,0.5);
            color: #ffffff;
            color: #ff00ff;
            color: #ff0000;
            /* 16进制简写形式#rgb 每个位置的取值范围是0-f */
            color: #fff;
            color: #f00;
        }
        .d1{
            background-image: url("img/mr.png");
            background-size: 100px 200px;
            /* 没有图的地方显示背景颜色 */
            background-color: lime;
            width: 100px;
            height: 200px;
        }
        .d2{
            background-image: url("img/mr.png");
            background-size: 100px,208px;
            background-position: 200px 100px;
            background-position: 50% 50%;
            background-position: center bottom;
            background-repeat: no-repeat;
            border: red solid 5px;
            width: 500px;
            height: 300px;
        }
        .d3{
            width: 300px;
            height: 200px;
            background-image: linear-gradient(30deg,red  ,blue ,green);
        }
    </style>
</head>
<body>
    <h1>测试颜色</h1>
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>
</body>
</html>